package com.baitiaojun.user.mapper;

import com.baitiaojun.api.domain.user.UserFollowing;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface UserFollowingMapper {
    int deleteByPrimaryKey(@Param("id") Long id);

    int insert(UserFollowing record);

    int insertSelective(UserFollowing record);

    UserFollowing selectByPrimaryKey(@Param("id") Long id);

    int updateByPrimaryKeySelective(UserFollowing record);

    int updateByPrimaryKey(UserFollowing record);

    List<UserFollowing> selectUserFollowingListByUserId(@Param("userId") Long userid);

    int deleteByUseridAndFollowingid(@Param("userid") Long userid, @Param("followingid") Long followingid);

    Integer selectIsExistsUserFollowingByFollowingId(@Param("userid") Long userid, @Param("followingid") Long followingid);

    List<UserFollowing> selectFansByUserInfoId(@Param("userInfoId") Long userInfoId);

    Integer fansCountByUserInfoId(Long userInfoId);

    List<UserFollowing> selectByGroupId(@Param("groupId") Long groupId);

    int batchMoveUserFollowingGroup(@Param("ids") List<Long> ids, @Param("groupId") Long groupId);

    Set<Long> selectFollowingUserIdsByUserId(Long userId);

    Integer followingCountByUserId(Long userId);
}